using UnityEngine;

namespace BasicScript.Component
{
	public class SpriteAssets : MonoBehaviour
	{
		public AtlasData data;

		public Sprite GetSprite(string name)
		{
			if (data == null || data.sprites == null)
			{
				return null;
			}
			for (int i = 0; i < data.sprites.Count; i++)
			{
				if (data.sprites[i] != null && data.sprites[i].name.Equals(name))
				{
					return data.sprites[i];
				}
			}
			return null;
		}
	}
}
